package com.gofaraway.common.exception;

import static com.gofaraway.common.exception.ErrorCodeEnum.ERROR_CODE_00000;

/**
 * @author ChenPeng
 * @Date 2024/5/17 9:53
 */
public class BaseException extends Error {
    public BaseException(ErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getCode(), errorCodeEnum.getMessage());
    }

    public BaseException(ErrorCodeEnum errorCodeEnum,Object data) {
        super(errorCodeEnum.getCode(), errorCodeEnum.getMessage(),data);
    }

    /**
     * 通用系统异常,系统正常执行
     */
    public static final BaseException ERROR_CODE_SYSTEM_NORMAL = new BaseException(ERROR_CODE_00000);
}
